check that tab_label is not NULL before checking that it's notebook's
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 10 May 2006 15:58:48 +0000 (15:58 +0000)
committerCarlos Garnacho <carlosg@src.gnome.org>
Wed, 10 May 2006 15:58:48 +0000 (15:58 +0000)
2006-05-10  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtknotebook.c: check that tab_label is not NULL before checking
        that it's notebook's child. Closes #341247.

ChangeLog
ChangeLog.pre-2-10
gtk/gtknotebook.c

index cf5a7aa6e0620eccbc38f1e325800ac8bc9e1206..91bfdb55c1e1c5d2b97c5eeeebb1130abf03f522 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-10  Carlos Garnacho  <carlosg@gnome.org>
+
+       * gtk/gtknotebook.c: check that tab_label is not NULL before checking
+       that it's notebook's child. Closes #341247.
+
 Wed May 10 15:57:53 2006  Tim Janik  <timj@imendio.com>
 
        * applied unified patch for configurable scroll arrow sizes from
index cf5a7aa6e0620eccbc38f1e325800ac8bc9e1206..91bfdb55c1e1c5d2b97c5eeeebb1130abf03f522 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-10  Carlos Garnacho  <carlosg@gnome.org>
+
+       * gtk/gtknotebook.c: check that tab_label is not NULL before checking
+       that it's notebook's child. Closes #341247.
+
 Wed May 10 15:57:53 2006  Tim Janik  <timj@imendio.com>
 
        * applied unified patch for configurable scroll arrow sizes from
index 3c8c7d28304b9836e0774636a88a4f8730c626db..7b336494e67f955ddb8827f356d37121940cb9b4 100644 (file)
@@ -124,7 +124,7 @@ enum {
 #define PAGE_TOP_Y(_page_)    (((GtkNotebookPage *) (_page_))->allocation.y)
 #define PAGE_BOTTOM_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height)
 #define PAGE_MIDDLE_Y(_page_) (((GtkNotebookPage *) (_page_))->allocation.y + ((GtkNotebookPage *) (_page_))->allocation.height / 2)
-#define NOTEBOOK_IS_TAB_LABEL_PARENT(_notebook_,_page_) (((GtkNotebookPage *) (_page_))->tab_label->parent == ((GtkWidget *) (_notebook_)))
+#define NOTEBOOK_IS_TAB_LABEL_PARENT(_notebook_,_page_) ((_page_)->tab_label != NULL && ((GtkNotebookPage *) (_page_))->tab_label->parent == ((GtkWidget *) (_notebook_)))
 
 struct _GtkNotebookPage
 {